/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sellcar;

import java.awt.Component;
import java.awt.Container;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFormattedTextField;
import javax.swing.JOptionPane;
import javax.swing.JTextField;

/**
 *
 * @author Fabio Valenzuela
 */
public class Cadastro_Cliente extends javax.swing.JFrame {

    /** Creates new form Cadastro_Cliente */
    private Connection connection;
        
    public Cadastro_Cliente() throws SQLException {
        initComponents();
        this.setLocationRelativeTo(null);
        this.connection = new ConnectionFactory().getConnection();
        mostrar();
    }
    
    public void limparTodosCampos(Container container) {  
    Component components[] = container.getComponents();  
    for (Component component : components) {  
        if (component instanceof JFormattedTextField) {  
            JFormattedTextField field = (JFormattedTextField) component;  
            field.setValue(null);  
        } else if (component instanceof JTextField) {  
            JTextField field = (JTextField) component;  
            field.setText("");  
        } else if (component instanceof Container) {  
            limparTodosCampos((Container) component);  
        }  
    }
    }    
    


    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        Titulo = new javax.swing.JLabel();
        Nome = new javax.swing.JLabel();
        TxtNome = new javax.swing.JTextField();
        RG = new javax.swing.JLabel();
        TxtRG = new javax.swing.JFormattedTextField();
        CPF = new javax.swing.JLabel();
        TxtCPF = new javax.swing.JFormattedTextField();
        DtNasc = new javax.swing.JLabel();
        TxtDtnasc = new javax.swing.JFormattedTextField();
        Cel1 = new javax.swing.JLabel();
        TxtCel1 = new javax.swing.JFormattedTextField();
        Tel1 = new javax.swing.JLabel();
        TxtTel1 = new javax.swing.JFormattedTextField();
        End = new javax.swing.JLabel();
        TxtEnd = new javax.swing.JTextField();
        Compl = new javax.swing.JLabel();
        TxtCompl = new javax.swing.JTextField();
        UF = new javax.swing.JLabel();
        TxtUF = new javax.swing.JTextField();
        CEP = new javax.swing.JLabel();
        TxtCEP = new javax.swing.JFormattedTextField();
        Cidade = new javax.swing.JLabel();
        TxtCid = new javax.swing.JTextField();
        Bairro = new javax.swing.JLabel();
        BtSalvar = new javax.swing.JButton();
        BtLimpar = new javax.swing.JButton();
        BtVoltar = new javax.swing.JButton();
        DtEmissao = new javax.swing.JLabel();
        TxtDtEmissao = new javax.swing.JFormattedTextField();
        Orgao = new javax.swing.JLabel();
        TxtOrgao = new javax.swing.JTextField();
        Pai = new javax.swing.JLabel();
        TxtPai = new javax.swing.JTextField();
        Mae = new javax.swing.JLabel();
        TxtMae = new javax.swing.JTextField();
        TxtBairro = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        Empresa = new javax.swing.JLabel();
        TxtEmp = new javax.swing.JTextField();
        Cargo = new javax.swing.JLabel();
        TxtCargo = new javax.swing.JTextField();
        TempEmp = new javax.swing.JLabel();
        TxtTempEmp = new javax.swing.JTextField();
        Bairro1 = new javax.swing.JLabel();
        TxtBairro1 = new javax.swing.JTextField();
        TxtCid1 = new javax.swing.JTextField();
        TxtCompl1 = new javax.swing.JTextField();
        Comp1 = new javax.swing.JLabel();
        Cidade1 = new javax.swing.JLabel();
        TxtCEP1 = new javax.swing.JFormattedTextField();
        CEP1 = new javax.swing.JLabel();
        TxtTel2 = new javax.swing.JFormattedTextField();
        Tel2 = new javax.swing.JLabel();
        TxtEnd1 = new javax.swing.JTextField();
        End1 = new javax.swing.JLabel();
        Salario = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        Agencia = new javax.swing.JLabel();
        TxtAgencia = new javax.swing.JTextField();
        Conta = new javax.swing.JLabel();
        TxtConta = new javax.swing.JTextField();
        Banco = new javax.swing.JLabel();
        TxtBanco = new javax.swing.JTextField();
        Email = new javax.swing.JLabel();
        TxtEmail = new javax.swing.JTextField();
        Naturalidade = new javax.swing.JLabel();
        TxtNat = new javax.swing.JTextField();
        Numero = new javax.swing.JLabel();
        TxtNum = new javax.swing.JTextField();
        TxtSalario = new sellcar.JNumberFormatField();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jButton5 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        Titulo.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        Titulo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        Titulo.setText("CADASTRO DE CLIENTES");

        Nome.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Nome.setText("Nome: ");

        TxtNome.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtNome.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        RG.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        RG.setText("RG:");

        try {
            TxtRG.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##.###.###-#")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        TxtRG.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        CPF.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        CPF.setText("CPF:");

        try {
            TxtCPF.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        TxtCPF.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        DtNasc.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        DtNasc.setText("Dt. Nascimento:");

        try {
            TxtDtnasc.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        TxtDtnasc.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        Cel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Cel1.setText("Cel:");

        try {
            TxtCel1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(###)#####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        TxtCel1.setHorizontalAlignment(javax.swing.JTextField.LEFT);
        TxtCel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        Tel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Tel1.setText("Tel:");

        try {
            TxtTel1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(###)####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        TxtTel1.setHorizontalAlignment(javax.swing.JTextField.LEFT);
        TxtTel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        End.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        End.setText("End:");

        TxtEnd.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtEnd.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        Compl.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Compl.setText("Compl:");

        TxtCompl.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtCompl.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        UF.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        UF.setText("UF:");

        TxtUF.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtUF.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        CEP.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        CEP.setText("CEP:");

        try {
            TxtCEP.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("#####-###")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        TxtCEP.setHorizontalAlignment(javax.swing.JTextField.LEFT);
        TxtCEP.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        Cidade.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Cidade.setText("Cidade:");

        TxtCid.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtCid.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        Bairro.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Bairro.setText("Bairro:");

        BtSalvar.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        BtSalvar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sellcar/Icones/document_save_as.png"))); // NOI18N
        BtSalvar.setMnemonic('S');
        BtSalvar.setText("Salvar");
        BtSalvar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BtSalvarActionPerformed(evt);
            }
        });

        BtLimpar.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        BtLimpar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sellcar/Icones/delete.png"))); // NOI18N
        BtLimpar.setMnemonic('E');
        BtLimpar.setText("Limpar");
        BtLimpar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BtLimparActionPerformed(evt);
            }
        });

        BtVoltar.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        BtVoltar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sellcar/Icones/arrow_left.png"))); // NOI18N
        BtVoltar.setMnemonic('S');
        BtVoltar.setText("Voltar");
        BtVoltar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BtVoltarActionPerformed(evt);
            }
        });

        DtEmissao.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        DtEmissao.setText("Dt. Emissão:");

        try {
            TxtDtEmissao.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        TxtDtEmissao.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        Orgao.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Orgao.setText("Orgão Eimssor:");

        TxtOrgao.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtOrgao.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        Pai.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Pai.setText("Pai:");

        TxtPai.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtPai.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        Mae.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Mae.setText("Mãe");

        TxtMae.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtMae.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        TxtBairro.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtBairro.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        jLabel5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel5.setText("DADOS BANCARIOS");

        jLabel6.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel6.setText("DADOS PESSOAIS");

        Empresa.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Empresa.setText("Empresa:");

        TxtEmp.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtEmp.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        Cargo.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Cargo.setText("Cargo:");

        TxtCargo.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtCargo.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        TempEmp.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TempEmp.setText("Tempo de Empresa:");

        TxtTempEmp.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtTempEmp.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        Bairro1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Bairro1.setText("Bairro:");

        TxtBairro1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtBairro1.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        TxtCid1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtCid1.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        TxtCompl1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtCompl1.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        Comp1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Comp1.setText("Compl:");

        Cidade1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Cidade1.setText("Cidade:");

        try {
            TxtCEP1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("#####-###")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        CEP1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        CEP1.setText("CEP:");

        try {
            TxtTel2.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(###)####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        TxtTel2.setHorizontalAlignment(javax.swing.JTextField.LEFT);
        TxtTel2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        Tel2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Tel2.setText("Tel:");

        TxtEnd1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtEnd1.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        End1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        End1.setText("End:");

        Salario.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Salario.setText("Salario:");

        jLabel11.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel11.setText("DADOS PROFISSIONAIS");

        Agencia.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Agencia.setText("Agência:");

        TxtAgencia.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        Conta.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Conta.setText("Conta:");

        TxtConta.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        Banco.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Banco.setText("Banco:");

        TxtBanco.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        Email.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Email.setText("Email:");

        TxtEmail.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtEmail.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        Naturalidade.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Naturalidade.setText("Naturalidade:");

        TxtNat.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtNat.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        Numero.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Numero.setText("Num:");

        TxtNum.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TxtNum.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        TxtSalario.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        jButton1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sellcar/Icones/resultset_previous.png"))); // NOI18N
        jButton1.setText("Anterior");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButton2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sellcar/Icones/delete.png"))); // NOI18N
        jButton2.setText("Excluir");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jButton3.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sellcar/Icones/resultset_next.png"))); // NOI18N
        jButton3.setText("Proximo");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        jButton4.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sellcar/Icones/find.png"))); // NOI18N
        jButton4.setText("Pesquisa");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        jButton5.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sellcar/Icones/pencil.png"))); // NOI18N
        jButton5.setText("Alterar");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(Titulo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(Nome)
                            .addComponent(CPF)
                            .addComponent(RG))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(TxtNome)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(TxtRG, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(TxtCPF, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 106, Short.MAX_VALUE))
                                .addGap(29, 29, 29)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(DtNasc)
                                    .addComponent(DtEmissao))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(TxtDtnasc, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(layout.createSequentialGroup()
                                                .addComponent(Orgao)
                                                .addGap(0, 0, Short.MAX_VALUE))
                                            .addGroup(layout.createSequentialGroup()
                                                .addComponent(Naturalidade)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                .addComponent(TxtNat))))
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(TxtDtEmissao, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(99, 99, 99)
                                        .addComponent(TxtOrgao))))))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(Pai)
                        .addGap(31, 31, 31)
                        .addComponent(TxtPai))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(Mae)
                        .addGap(28, 28, 28)
                        .addComponent(TxtMae))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                .addComponent(End)
                                .addGap(25, 25, 25)
                                .addComponent(TxtEnd, javax.swing.GroupLayout.PREFERRED_SIZE, 266, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(Compl))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(Bairro)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(TxtTel1, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(Cel1)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(TxtCel1, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(TxtBairro, javax.swing.GroupLayout.PREFERRED_SIZE, 266, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(Cidade)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(TxtCompl)
                            .addComponent(TxtCid))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(CEP)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(TxtCEP, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(Numero)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(TxtNum, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(UF)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(TxtUF, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(Empresa)
                            .addComponent(Tel1)
                            .addComponent(Cargo))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(TxtCargo, javax.swing.GroupLayout.PREFERRED_SIZE, 266, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(TempEmp)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(TxtTempEmp))
                            .addComponent(TxtEmp)))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(Bairro1)
                                    .addComponent(Tel2))
                                .addGap(18, 18, 18)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(TxtBairro1, javax.swing.GroupLayout.PREFERRED_SIZE, 266, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(TxtTel2, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(Salario)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(TxtSalario, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE))))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                .addComponent(End1)
                                .addGap(29, 29, 29)
                                .addComponent(TxtEnd1, javax.swing.GroupLayout.PREFERRED_SIZE, 266, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(14, 14, 14)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(Cidade1)
                                    .addComponent(Comp1))))
                        .addGap(19, 19, 19)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(TxtCompl1, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE)
                                .addGap(58, 58, 58)
                                .addComponent(CEP1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(TxtCEP1, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(TxtCid1)))
                    .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 658, Short.MAX_VALUE)
                    .addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, 658, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(Email)
                        .addGap(19, 19, 19)
                        .addComponent(TxtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 314, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jButton1))
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addGap(18, 18, 18)
                                        .addComponent(jButton3))
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                        .addGap(16, 16, 16)
                                        .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE))))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(Agencia)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(TxtAgencia, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(Conta)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(TxtConta, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(Banco)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(TxtBanco, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addGap(0, 0, Short.MAX_VALUE)
                                .addComponent(BtSalvar)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jButton4)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(BtLimpar)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(BtVoltar)))))))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(Titulo)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel6)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TxtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(Nome))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(Email)
                            .addComponent(TxtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TxtCPF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(CPF)
                            .addComponent(DtNasc)
                            .addComponent(TxtDtnasc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(Naturalidade)
                            .addComponent(TxtNat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(RG)
                            .addComponent(TxtRG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(DtEmissao)
                            .addComponent(TxtDtEmissao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(TxtOrgao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(Orgao)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(Pai)
                    .addComponent(TxtPai, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(Mae)
                    .addComponent(TxtMae, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(End)
                        .addComponent(TxtEnd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(TxtCompl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(Compl)
                        .addComponent(Numero)
                        .addComponent(TxtNum, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(UF)
                        .addComponent(TxtUF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(Bairro)
                        .addComponent(Cidade)
                        .addComponent(TxtCid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(TxtBairro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(CEP))
                    .addComponent(TxtCEP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(Tel1)
                    .addComponent(TxtTel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(TxtCel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(Cel1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel11)
                .addGap(1, 1, 1)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(Empresa)
                    .addComponent(TxtEmp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TxtCargo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(Cargo)
                    .addComponent(TempEmp)
                    .addComponent(TxtTempEmp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(End1)
                        .addComponent(TxtEnd1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(Comp1)
                        .addComponent(TxtCompl1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(TxtCEP1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(CEP1)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(Bairro1)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TxtCid1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(Cidade1)
                            .addComponent(TxtBairro1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(TxtTel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(Tel2)
                                .addComponent(Salario))
                            .addComponent(TxtSalario, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(14, 14, 14)
                .addComponent(jLabel5)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(Agencia)
                    .addComponent(TxtAgencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(Conta)
                    .addComponent(TxtConta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(Banco)
                    .addComponent(TxtBanco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton4)
                    .addComponent(jButton2)
                    .addComponent(jButton5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(BtSalvar)
                    .addComponent(BtLimpar)
                    .addComponent(BtVoltar)
                    .addComponent(jButton1)
                    .addComponent(jButton3))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void BtSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BtSalvarActionPerformed
        // TODO add your handling code here:
        Cliente cliente = new Cliente();

        cliente.setNome(TxtNome.getText());
        cliente.setEmail(TxtEmail.getText());
        cliente.setCpf(TxtCPF.getText().replaceAll("\\D", ""));
        //cliente.setCpf(Long.parseLong(TxtCPF.getText().replaceAll("\\D", "")));
        cliente.setDt_nasc(TxtDtnasc.getText());
        cliente.setRg(TxtRG.getText().replaceAll("\\D", ""));
        cliente.setDt_emissao(TxtDtEmissao.getText());
        cliente.setNaturalidade(TxtNat.getText());
        cliente.setPai(TxtPai.getText());
        cliente.setMae(TxtMae.getText());
        cliente.setEnd(TxtEnd.getText());
        cliente.setCompl(TxtCompl.getText());
        cliente.setUf(TxtUF.getText());
        cliente.setCep(TxtCEP.getText().replaceAll("\\D", ""));
        cliente.setBairro(TxtBairro.getText());
        cliente.setCidade(TxtCid.getText());
        cliente.setTel(TxtTel1.getText().replaceAll("\\D", ""));;
        cliente.setCel(TxtCel1.getText().replaceAll("\\D", ""));
        cliente.setEmpresa(TxtEmp.getText());
        cliente.setCargo(TxtCargo.getText());
        cliente.setTemp_empresa(TxtTempEmp.getText());
        cliente.setEnd2(TxtEnd1.getText());
        cliente.setCompl2(TxtCompl1.getText());
        cliente.setCep2(TxtCEP1.getText().replaceAll("\\D", ""));
        cliente.setBairro2(TxtBairro1.getText());
        cliente.setCidade2(TxtCid1.getText());
        cliente.setTel2(TxtTel2.getText().replaceAll("\\D", ""));
        cliente.setSalario(TxtSalario.getText());
        cliente.setAgencia(TxtAgencia.getText());
        cliente.setConta(TxtConta.getText());
        cliente.setBanco(TxtBanco.getText());
        cliente.setOrgao(TxtOrgao.getText());
        cliente.setNum(TxtNum.getText());
        
        
        Cadastro_ClienteDAO cadastro_ClienteDAO = new Cadastro_ClienteDAO();


        cadastro_ClienteDAO.adiciona(cliente);
        JOptionPane.showMessageDialog(null, "Cliente Gravado com Sucesso");

    }//GEN-LAST:event_BtSalvarActionPerformed

    private void BtVoltarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BtVoltarActionPerformed
        // Botão Voltar
        // Encerra a tela de cadastro
        this.dispose();
    }//GEN-LAST:event_BtVoltarActionPerformed

    private void BtLimparActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BtLimparActionPerformed
        // limpa todos componentes
        limparTodosCampos(rootPane);
        
    }//GEN-LAST:event_BtLimparActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        try {
            // TODO add your handling code here:
            
            //BOTAO PESQUISAR
            
            rsMostrar.first();
            
            String id = rsMostrar.getString("id_cliente");    
            TxtNome.setText(rsMostrar.getString("nome_cliente"));
            TxtEmail.setText(rsMostrar.getString("email"));
            TxtCPF.setText(rsMostrar.getString("cpf"));        
            TxtDtnasc.setText(rsMostrar.getString("data_nasc"));
            TxtRG.setText(rsMostrar.getString("rg"));
            TxtDtEmissao.setText(rsMostrar.getString("data_emissao"));
            TxtNat.setText(rsMostrar.getString("naturalidade"));
            TxtPai.setText(rsMostrar.getString("nome_pai"));
            TxtMae.setText(rsMostrar.getString("nome_mae"));
            TxtEnd.setText(rsMostrar.getString("endereco"));
            TxtCompl.setText(rsMostrar.getString("complemento"));
            TxtUF.setText(rsMostrar.getString("estado"));
            TxtCEP.setText(rsMostrar.getString("cep"));
            TxtBairro.setText(rsMostrar.getString("bairro"));
            TxtCid.setText(rsMostrar.getString("cidade"));
            TxtTel1.setText(rsMostrar.getString("telefone"));
            TxtCel1.setText(rsMostrar.getString("celular"));
            TxtEmp.setText(rsMostrar.getString("empresa"));
            TxtCargo.setText(rsMostrar.getString("cargo"));
            TxtTempEmp.setText(rsMostrar.getString("tempo_empresa"));
            TxtEnd1.setText(rsMostrar.getString("end_empresa"));
            TxtCompl1.setText(rsMostrar.getString("complemento_empresa"));
            TxtCEP1.setText(rsMostrar.getString("nome_cliente"));
            TxtBairro1.setText(rsMostrar.getString("bairro_empresa"));
            TxtCid1.setText(rsMostrar.getString("cidade_empresa"));
            TxtTel2.setText(rsMostrar.getString("telefone_empresa"));
            TxtSalario.setText(rsMostrar.getString("salario"));
            TxtAgencia.setText(rsMostrar.getString("agencia"));
            TxtConta.setText(rsMostrar.getString("conta"));
            TxtBanco.setText(rsMostrar.getString("banco"));
            TxtOrgao.setText(rsMostrar.getString("orgao_emissor"));
            TxtNum.setText(rsMostrar.getString("numero"));
            
            
            
        } catch (SQLException ex) {
            Logger.getLogger(Cadastro_Cliente.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    }//GEN-LAST:event_jButton4ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        
        //BOTAO EXCLUIR
        
        PreparedStatement stmt;
        
        try {            
            String id = rsMostrar.getString("id_cliente");
            
            String sql = "delete from tb_cadastro_cliente  where id_cliente = " + Integer.parseInt(id);
            stmt = connection.prepareStatement(sql);
            stmt.execute();
            stmt.close();
            
            JOptionPane.showMessageDialog(null,"Usuario deletado do sistema");
            
            mostrar();
            
        } catch (SQLException ex) {
            Logger.getLogger(Cadastro_Usuario.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
        
        //BOTÃO PROXIMO

        int i;
        if(atual == total){
            JOptionPane.showMessageDialog(null, "ops!!!!!");
        }else{
            
                try {
            atual = atual + 1;

            rsMostrar.next();
            
            TxtNome.setText(rsMostrar.getString("nome_cliente"));
            TxtEmail.setText(rsMostrar.getString("email"));
            TxtCPF.setText(rsMostrar.getString("cpf"));        
            TxtDtnasc.setText(rsMostrar.getString("data_nasc"));
            TxtRG.setText(rsMostrar.getString("rg"));
            TxtDtEmissao.setText(rsMostrar.getString("data_emissao"));
            TxtNat.setText(rsMostrar.getString("naturalidade"));
            TxtPai.setText(rsMostrar.getString("nome_pai"));
            TxtMae.setText(rsMostrar.getString("nome_mae"));
            TxtEnd.setText(rsMostrar.getString("endereco"));
            TxtCompl.setText(rsMostrar.getString("complemento"));
            TxtUF.setText(rsMostrar.getString("estado"));
            TxtCEP.setText(rsMostrar.getString("cep"));
            TxtBairro.setText(rsMostrar.getString("bairro"));
            TxtCid.setText(rsMostrar.getString("cidade"));
            TxtTel1.setText(rsMostrar.getString("telefone"));
            TxtCel1.setText(rsMostrar.getString("celular"));
            TxtEmp.setText(rsMostrar.getString("empresa"));
            TxtCargo.setText(rsMostrar.getString("cargo"));
            TxtTempEmp.setText(rsMostrar.getString("tempo_empresa"));
            TxtEnd1.setText(rsMostrar.getString("end_empresa"));
            TxtCompl1.setText(rsMostrar.getString("complemento_empresa"));
            TxtCEP1.setText(rsMostrar.getString("nome_cliente"));
            TxtBairro1.setText(rsMostrar.getString("bairro_empresa"));
            TxtCid1.setText(rsMostrar.getString("cidade_empresa"));
            TxtTel2.setText(rsMostrar.getString("telefone_empresa"));
            TxtSalario.setText(rsMostrar.getString("salario"));
            TxtAgencia.setText(rsMostrar.getString("agencia"));
            TxtConta.setText(rsMostrar.getString("conta"));
            TxtBanco.setText(rsMostrar.getString("banco"));
            TxtOrgao.setText(rsMostrar.getString("orgao_emissor"));
            TxtNum.setText(rsMostrar.getString("numero"));


        } catch (Exception ex) {
            JOptionPane.showMessageDialog(null, "Erro" + ex.getMessage());
        }
        }
    }//GEN-LAST:event_jButton3ActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
         try {
        // TODO add your handling code here:
        
        //BOTAO ANTERIOR
        
        rsMostrar.previous();
        
        TxtNome.setText(rsMostrar.getString("nome_cliente"));
        TxtEmail.setText(rsMostrar.getString("email"));
        TxtCPF.setText(rsMostrar.getString("cpf"));        
        TxtDtnasc.setText(rsMostrar.getString("data_nasc"));
        TxtRG.setText(rsMostrar.getString("rg"));
        TxtDtEmissao.setText(rsMostrar.getString("data_emissao"));
        TxtNat.setText(rsMostrar.getString("naturalidade"));
        TxtPai.setText(rsMostrar.getString("nome_pai"));
        TxtMae.setText(rsMostrar.getString("nome_mae"));
        TxtEnd.setText(rsMostrar.getString("endereco"));
        TxtCompl.setText(rsMostrar.getString("complemento"));
        TxtUF.setText(rsMostrar.getString("estado"));
        TxtCEP.setText(rsMostrar.getString("cep"));
        TxtBairro.setText(rsMostrar.getString("bairro"));
        TxtCid.setText(rsMostrar.getString("cidade"));
        TxtTel1.setText(rsMostrar.getString("telefone"));
        TxtCel1.setText(rsMostrar.getString("celular"));
        TxtEmp.setText(rsMostrar.getString("empresa"));
        TxtCargo.setText(rsMostrar.getString("cargo"));
        TxtTempEmp.setText(rsMostrar.getString("tempo_empresa"));
        TxtEnd1.setText(rsMostrar.getString("end_empresa"));
        TxtCompl1.setText(rsMostrar.getString("complemento_empresa"));
        TxtCEP1.setText(rsMostrar.getString("nome_cliente"));
        TxtBairro1.setText(rsMostrar.getString("bairro_empresa"));
        TxtCid1.setText(rsMostrar.getString("cidade_empresa"));
        TxtTel2.setText(rsMostrar.getString("telefone_empresa"));
        TxtSalario.setText(rsMostrar.getString("salario"));
        TxtAgencia.setText(rsMostrar.getString("agencia"));
        TxtConta.setText(rsMostrar.getString("conta"));
        TxtBanco.setText(rsMostrar.getString("banco"));
        TxtOrgao.setText(rsMostrar.getString("orgao_emissor"));
        TxtNum.setText(rsMostrar.getString("numero"));
        
    } catch (SQLException ex) {
        ex.printStackTrace();
    }
    }//GEN-LAST:event_jButton1ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Cadastro_Cliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Cadastro_Cliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Cadastro_Cliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Cadastro_Cliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                try {
                    new Cadastro_Cliente().setVisible(true);
                } catch (SQLException ex) {
                    Logger.getLogger(Cadastro_Cliente.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel Agencia;
    private javax.swing.JLabel Bairro;
    private javax.swing.JLabel Bairro1;
    private javax.swing.JLabel Banco;
    private javax.swing.JButton BtLimpar;
    private javax.swing.JButton BtSalvar;
    private javax.swing.JButton BtVoltar;
    private javax.swing.JLabel CEP;
    private javax.swing.JLabel CEP1;
    private javax.swing.JLabel CPF;
    private javax.swing.JLabel Cargo;
    private javax.swing.JLabel Cel1;
    private javax.swing.JLabel Cidade;
    private javax.swing.JLabel Cidade1;
    private javax.swing.JLabel Comp1;
    private javax.swing.JLabel Compl;
    private javax.swing.JLabel Conta;
    private javax.swing.JLabel DtEmissao;
    private javax.swing.JLabel DtNasc;
    private javax.swing.JLabel Email;
    private javax.swing.JLabel Empresa;
    private javax.swing.JLabel End;
    private javax.swing.JLabel End1;
    private javax.swing.JLabel Mae;
    private javax.swing.JLabel Naturalidade;
    private javax.swing.JLabel Nome;
    private javax.swing.JLabel Numero;
    private javax.swing.JLabel Orgao;
    private javax.swing.JLabel Pai;
    private javax.swing.JLabel RG;
    private javax.swing.JLabel Salario;
    private javax.swing.JLabel Tel1;
    private javax.swing.JLabel Tel2;
    private javax.swing.JLabel TempEmp;
    private javax.swing.JLabel Titulo;
    private javax.swing.JTextField TxtAgencia;
    private javax.swing.JTextField TxtBairro;
    private javax.swing.JTextField TxtBairro1;
    private javax.swing.JTextField TxtBanco;
    private javax.swing.JFormattedTextField TxtCEP;
    private javax.swing.JFormattedTextField TxtCEP1;
    private javax.swing.JFormattedTextField TxtCPF;
    private javax.swing.JTextField TxtCargo;
    private javax.swing.JFormattedTextField TxtCel1;
    private javax.swing.JTextField TxtCid;
    private javax.swing.JTextField TxtCid1;
    private javax.swing.JTextField TxtCompl;
    private javax.swing.JTextField TxtCompl1;
    private javax.swing.JTextField TxtConta;
    private javax.swing.JFormattedTextField TxtDtEmissao;
    private javax.swing.JFormattedTextField TxtDtnasc;
    private javax.swing.JTextField TxtEmail;
    private javax.swing.JTextField TxtEmp;
    private javax.swing.JTextField TxtEnd;
    private javax.swing.JTextField TxtEnd1;
    private javax.swing.JTextField TxtMae;
    private javax.swing.JTextField TxtNat;
    private javax.swing.JTextField TxtNome;
    private javax.swing.JTextField TxtNum;
    private javax.swing.JTextField TxtOrgao;
    private javax.swing.JTextField TxtPai;
    private javax.swing.JFormattedTextField TxtRG;
    private sellcar.JNumberFormatField TxtSalario;
    private javax.swing.JFormattedTextField TxtTel1;
    private javax.swing.JFormattedTextField TxtTel2;
    private javax.swing.JTextField TxtTempEmp;
    private javax.swing.JTextField TxtUF;
    private javax.swing.JLabel UF;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    // End of variables declaration//GEN-END:variables

    ResultSet rsMostrar = null;
    
    private int atual = 0;
    private int total = 0;

    public ResultSet mostrar() throws SQLException {

        PreparedStatement stmt;

        String sql = "SELECT id_cliente,nome_cliente,data_nasc,cpf,rg,data_emissao,orgao_emissor,naturalidade,nome_mae,nome_pai,endereco,numero,complemento,bairro,cep,cidade,estado,telefone,"
                + "celular,empresa,cargo,tempo_empresa,end_empresa,complemento_empresa,bairro_empresa,cidade_empresa,estado_empresa,telefone_empresa,salario,agencia,conta,banco,email FROM tb_cadastro_cliente";
        stmt = connection.prepareStatement(sql);
        rsMostrar = stmt.executeQuery(sql);
        while (rsMostrar.next()) {
            total = total + 1;
            //JOptionPane.showMessageDialog(null, rsMostrar.getString(1));
        }
        //rsMostrar.first();
        return rsMostrar;

    }
}